import { MockMethod } from 'vite-plugin-mock';
import { resultSuccess } from '../_util';

import * as fs from 'fs';

export default [
  {
    url: '/falcon/mock/file',
    timeout: 1000,
    method: 'get',
    response: () => {
      fs.readFile('./hello.md', 'utf-8', (error, data) => {
        console.log(data);

        return resultSuccess(data);
      });
    },
  },
] as MockMethod[];
